|
|
|
|
|
|
|
Listing 12.13. Coding the UserControl_ReadProperties event. |
|
|
|
|
|
|
|
|
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
'
' get design-time vars
'
With PropBag
strDBName = .ReadProperty("DatabaseName", "")
strConnect = .ReadProperty("Connect", "")
strRSName = .ReadProperty("RecordSource", "")
strListField = .ReadProperty("ListField", "")
strBoundColumn = .ReadProperty("BoundColumn", "")
End With
'
End Sub |
|
|
|
|
|
|
|
|
The Initialize and Resize events can be used to set and adjust the size of the control. Enter the code from Listing 12.14 into the Initialize and Resize events of the User control. |
|
|
|
|
|
|
|
|
Listing 12.14. Coding the Initialize and Resize events of the User control. |
|
|
|
|
|
|
|
|
Private Sub UserControl_Initialize()
'
' set default size
'
UserControl.Height = 315
UserControl.Width = 315
'
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
'
' get design-time vars
'
With PropBag
strDBName = .ReadProperty("DatabaseName", "")
strConnect = .ReadProperty("Connect", "")
strRSName = .ReadProperty("RecordSource", "")
strListField = .ReadProperty("ListField", "")
strBoundColumn = .ReadProperty("BoundColumn", "")
End With
'
End Sub |
|
|
|
|
|